<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<title>双辉旅程网</title>
	{load href="/css/weui.min.css" /}
	<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
</head>
<body>
<div id="loadingToast" style="display:none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <i class="weui-loading weui-icon_toast"></i>
        <p class="weui-toast__content">登录中...</p>
    </div>
</div>
<input type="hidden" name="auth_id" value="{$auth_id}">
<div class="weui-cells weui-cells_form">
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">用户手机号</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" id="mobile" type="tel" pattern="[0-9]*" placeholder="请输入手机号"/>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd"><label for="" class="weui-label">密码</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="password" id="password" value=""/>
        </div>
    </div>
    <div class="button-sp-area">
	    <a href="javascript:;" id="log" class="weui-btn weui-btn_primary">登录</a><a href="javascript:;" class="weui-btn weui-btn_default">取消</a>
	</div>
</div>
<div class="weui-footer weui-footer_fixed-bottom">
    <p class="weui-footer__links">
        <a href="" class="weui-footer__link">双辉旅程网</a>
    </p>
    <p class="weui-footer__text">Copyright &copy; 2016-2016 shsytour</p>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$("#log").on("click",function(){
        $("#loadingToast").show();
		$.get("/user/login?mobile="+$("#mobile").val()+"&password="+$("#password").val(),function(data,status){
            if (data['code'] == 100) {
                window.location.href = '/User/Index';
            }else{
                $("#loadingToast").hide();
                alert(data['msg']);
            }
        });  
	});
});
</script>
</body>
</html>